<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up() {
        $data = [
            [
                'name' => '新闻',
                'description' => '每日新闻咨询，让你了解天下事'
            ],
            [
                'name' => '体育',
                'description' => '体坛大事尽在掌握'
            ],
            [
                'name' => '娱乐',
                'description' => '娱乐八卦，天天开心'
            ],
            [
                'name' => '旅行',
                'description' => '带你看不一样的风景'
            ],
        ];
        DB::table('categories')->insert($data);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down() {
        DB::table('categories')->truncate();
    }
};
